﻿#ifndef ITEMADD_H
#define ITEMADD_H

#include "support/sp_env.h"

namespace Ui {
class ItemAdd;
}

class ItemAdd : public QDialog
{
    Q_OBJECT

public:
    explicit ItemAdd(QWidget *parent, const QString &table, const QString &entry);
    ~ItemAdd();

    bool addItem(const QString &label, const QString &detail, const QString &addition);
    void setLabelPlaceholderText(const QString &label);
    void setDetailPlaceholderText(const QString &detail);
    void setAdditionPlaceholderText(const QString &addition);

    void setAdditionDisable();

private slots:
    void on_btn_submit_clicked();

private:
    Ui::ItemAdd *ui;

    QString _table;
    QString _entry;
};

#endif // ITEMADD_H
